import  axios from  'axios'

export default class OnFileService {
    static onFileService = null

    static getInstance(){
        if(this.onFileService == null){
            this.onFileService = new OnFileService()
        }
        return this.onFileService
    }


    SelectNoRecordCaselaw(params){
        return axios.get(`http://localhost/laws/SelectNoRecordCaselaw`,{
            params:params
        })
    }

    del(id){
        return axios.delete(`http://localhost/recordDocuments/${id}`)
    }

    save(OnFile){
        return axios.post(`http://localhost/recordDocuments`,OnFile)
    }

    list(params){
        return  axios.get(`http://localhost/recordDocuments`,{
            params:params
        })
    }

    list2(params){
        return  axios.get(`http://localhost/recordDocuments/all`,{
            params:params
        })
    }

    getOne(id){
        return axios.get(`http://localhost/recordDocuments/${id}`,)
    }

    update(OnFile){
        return axios.put(`http://localhost/recordDocuments`,OnFile)
    }


}
